using UnityEngine;

public class ButScrollMission : MonoBehaviour
{
	public UISprite iconMission;

	public UILabel lbTitleMission;

	public GameObject iconPVP;

	public GameObject iconPVE;

	private MissionBase _currMission;

	public void SetInfoMission(MissionBase curMis)
	{
		_currMission = curMis;
		iconMission.spriteName = curMis.StartedTarget().nameIcon;
		lbTitleMission.text = curMis.title;
		iconPVE.SetActive(curMis.offlineMission);
		iconPVP.SetActive(!curMis.offlineMission);
	}

	public void Mission_click()
	{
		if (_currMission != null)
		{
			ManagerMissions.currMission = _currMission;
			if (MainMenuMissionArrow.instance != null)
			{
				MainMenuMissionArrow.instance.ChangeArrow();
			}
		}
	}
}
